![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Oracle Performance Tuning and Optimization
Discrete TransactionsDiscrete transactions are an optional way of processing SQL statements. They may help performance in certain situations. Discrete transactions can be used only in a limited set of circumstances, but if you can take advantage of them, they can help performance. Discrete transactions work with small, nondistributed transactions and improve performance by deferring the writing of redo information until the transaction has been committed. Discrete transactions cannotand should notbe used for all transactions. How Do Discrete Transactions Work? With discrete transactions, all changes made to data are deferred until the transaction has been committed. Even though redo information is saved, it is not written to the redo log until the transaction has been committed. Until the commit, the redo information is stored in another area of memory. When the transaction is committed, the redo information is written to the redo log and the changes are made to the data block. This arrangement causes the rollback segments to be bypassed. Because the changes are deferred until the commit, the undo information does not have to be saved. With normal transactions, the undo information must be saved in the rollback segments because the data blocks have already been changed. With discrete transactions. because the data blocks have not been changed until the commit, it is unnecessary to save that information. Discrete transactions should not be used on data accessed with long-running queries because those queries will not be able to access any undo information. When Should Discrete Transactions Be Used? Discrete transactions should be used only under certain circumstances and with certain transaction types. Here are some guidelines for when to use discrete transactions:
Because of these restrictions, discrete transactions can be used only with a small subset of transactions. These transactions should be small and quick. If you can take advantage of discrete transactions, you should see a fairly good performance benefit.
SummaryTuning your SQL statements is one of the most important tasks you can do to improve performance. In fact, you should tune your SQL statements before tuning your RDBMS server. By tuning your SQL statements to be as efficient as possible, you can use your system to its full potential. Some of the things you can do to improve the efficiency of your SQL statements may involve as little effort as rewriting the SQL to take advantage of a property of your database or may involve changing the structure of the database itself. As you have seen, tuning SQL falls into two categories:
By designing your system with the goals of optimization and performance, you can take advantage of numerous Oracle features. By far, the best-tuned systems are those tuned from the design stage. This chapter described many ways you can tune the new application; if you have enough flexibility, you can make these changes to an existing application as well.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |